package top.itczw.beetl.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.itczw.beetl.dao.UserDao;
import top.itczw.beetl.entity.User;
import top.itczw.beetl.service.UserService;
import java.util.List;

/**
 * @author czw
 */
@Service
public class UserServiceImpl implements UserService {

	@Autowired
	private UserDao userDao;

    @Override
    public User findById(int id) {
		User user = userDao.findById(id);
		return user;
	}

	@Override
	public List<User> selectUserAndRole() {
		List<User> users = userDao.selectUserAndRole();
		return users;
	}

	@Override
	public void insert(User user, boolean b) {
		userDao.insert(user,b);
	}
}
